{extend name="layout/datagrid" /}
{block name="content_header"}
<h1>
    数据库备份
    <small>advanced tables</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
    <li><a href="#">管理员</a></li>
    <li class="active">数据库备份</li>
</ol>
{/block}
{block name="content"}
<div class="box">
    <div class="box-header">
        <div class="row">
            <div class="col-md-5">
                <button type="button" class="btn btn-sm btn-primary navbar-btn xsui-btn-process" data-url="{:url('dobackup','type=full')}" title="备份结构和数据">备份结构和数据</button>
                <button type="button" class="btn btn-sm btn-primary navbar-btn xsui-btn-process" data-url="{:url('dobackup','type=schema')}" title="备份结构">备份结构</button>
                <button type="button" class="btn btn-sm btn-primary navbar-btn xsui-btn-process" data-url="{:url('dobackup','type=data')}" title="备份数据">备份数据</button>
                <button type="button" class="btn btn-sm btn-success navbar-btn xsui-btn-refresh">刷新</button>
            </div>
            <div class="col-md-7">
            </div>
        </div>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <table class="xsui-datagrid table table-condensed table-bordered table-striped table-hover">
            <thead>
                <tr>
                    <th>#</th>
                    <th>文件名</th>
                    <th>文件大小</th>
                    <th>备份日期</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {foreach name="list" item="vo"}
                <tr>
                    <td></td>
                    <td>{$vo.filename}</td>
                    <td>{$vo.filesize}</td>
                    <td>{$vo.ctime}</td>
                    <td class="xsui-action-td">
                        <div class="btn-group btn-group-sm">
                            <a class="btn btn-sm btn-default btn-sm dropdown-toggle" data-toggle="dropdown" href="#">
                                操作
                                <span class="caret"></span>
                            </a>
                            <ul class="dropdown-menu pull-right" style="min-width: 60px">
                                <li><a href="{$vo['filepath']}" title="下载"><span class="fa fa-download"></span>下载</a></li>
                                <li><a href="{:url('doreback','filepath='.urlencode($vo['filepath']))}" class="xsui-btn-process" title="还原"><span class="fa fa-recycle"></span>还原</a></li>
                                <li><a href="{:url('delete','filepath='.$vo['filepath'])}" class="xsui-btn-delete" title="删除"><span class="fa fa-trash"></span>删除</a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
                {/foreach}
            </tbody>
        </table>
    </div>
    <!-- /.box-body -->
</div>
<!-- /.box -->
{/block}